package tako.wisers.com.android.apis.item;

import com.google.android.maps.GeoPoint;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;

public class StationItem extends BaseItem {

	private String id;
	private String mCity;
	private GeoPoint mLocation;
	private String mPhone;
	private String mURL;
	private String mPhotoUrl;
	private String mInfo;
	private int type;
	private int subType;
	private int shop;
	private int location;
	
	
	public StationItem(){
	}

	public StationItem(int type) {
		this.type = type;
	}
	
	public StationItem(Parcel in){
		id = in.readString();
		mCity = in.readString();
		int lan = in.readInt();
		int lon = in.readInt();
		mLocation = new GeoPoint(lan, lon);
		mPhone = in.readString();
		mURL = in.readString();
		mPhotoUrl = in.readString();
		mInfo = in.readString();
		type = in.readInt();
		subType = in.readInt();
		shop = in.readInt();
		location = in.readInt();
		baseReadFromParcel(in, mPhotoUrl != null && mPhotoUrl.length() > 5);
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel parcel, int flags) {
		parcel.writeString(id);
		parcel.writeString(mCity);
		parcel.writeInt(mLocation.getLatitudeE6());
        parcel.writeInt(mLocation.getLongitudeE6());
		parcel.writeString(mPhone);
		parcel.writeString(mURL);
		parcel.writeString(mPhotoUrl);
		parcel.writeString(mInfo);
		parcel.writeInt(type);
		parcel.writeInt(subType);
		parcel.writeInt(shop);
		parcel.writeInt(location);
		baseWriteToParcel(parcel, mPhotoUrl != null && mPhotoUrl.length() > 5);
	}

	public static final Parcelable.Creator<StationItem> CREATOR =
        new Parcelable.Creator<StationItem>() {
        public StationItem createFromParcel(Parcel in) {
            return new StationItem(in);
        }

        public StationItem[] newArray(int size) {
            return new StationItem[size];
        }
    };
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Bitmap getBitmap() {
		return mBitmap;
	}

	public void setBitmap(Bitmap bitmap) {
		mBitmap = bitmap;
	}

	public String getCity() {
		return mCity;
	}

	public void setCity(String city) {
		mCity = city;
	}

	public String getPhone() {
		return mPhone;
	}

	public void setPhone(String phone) {
		mPhone = phone;
	}

	public String getURL() {
		return mURL;
	}

	public void setURL(String murl) {
		mURL = murl;
	}

	public String getPhotoUrl() {
		return mPhotoUrl;
	}

	public void setPhotoUrl(String photoUrl) {
		mPhotoUrl = photoUrl;
	}

	public GeoPoint getLocation() {
		return mLocation;
	}

	public void setLocation(GeoPoint location) {
		mLocation = location;
	}

	public String getInfo() {
		return mInfo;
	}

	public void setInfo(String info) {
		mInfo = info;
	}

	public int getSubType() {
		return subType;
	}

	public void setSubType(int subType) {
		this.subType = subType;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getShop() {
		return shop;
	}

	public void setShop(int shop) {
		this.shop = shop;
	}

	public void setLocation(int location) {
		this.location = location;
	}
	
}
